package com.ziyun.erp.modules.goods.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.ziyun.erp.modules.goodsMonitor.annotation.CustomAnnotation;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 商品属性表
 * 
 * @author xueqz
 * @email 
 * @date 2018-08-20 09:57:04
 */
@TableName("goods_attribute")
public class GoodsAttributeEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 属性id
	 */
	@TableId
	private Long attributeId;
	/**
	 * 属性名称
	 */
	private String attributeName;
	/**
	 * 属性类型:1.普通,2.材料,3.工艺,4.设计
	 */
	private String attributeType;
	/**
	 * 页数(1)、文字(5)、数字(3)、图片(4)、尺寸(2)、大纸(6)
	 */
	private Long classify;
	/**
	 * 属性排序
	 */
	private Integer attributeSort;
	/**
	 * 创建人
	 */
	private String createName;
//	/**
//	 *影响工艺或sku价格方式
//	 */
//	@TableField(exist = false)
//	private Boolean influenceCraftType;
	/**
	 * 创建时间
	 */
	private String createTime;
	/**
	 * 是否删除
	 */
	private Boolean disabled;
	/**
	 *
	 */
	private String attributeValueKey;
	/**
	 * 是否参与sku生成
	 */
	@TableField(exist = false)
	private Boolean joinAttribute;
	/**
	 * 所选择的选项集合
	 */
	@TableField(exist = false)
	private List<GoodsOptionEntity> optionSelectedList;
	/**
	 * 分类ID
	 */
	private Integer categoryId;
	/**
	 * 分类名称
	 */
	@TableField(exist = false)
	private String categoryName;
	/**
	 * 规格属性值集合
	 */
	@TableField(exist = false)
	@CustomAnnotation(recursionFlag = true)
	private List<GoodsOptionEntity> goodsOptionList;
	/**
	 *旧系统数据表示
	 */
	private Boolean dateFlag;

	/**
	 * 设置：属性id
	 */
	public void setAttributeId(Long attributeId) {
		this.attributeId = attributeId;
	}
	/**
	 * 获取：属性id
	 */
	public Long getAttributeId() {
		return attributeId;
	}
	/**
	 * 设置：属性名称
	 */
	public void setAttributeName(String attributeName) {
		this.attributeName = attributeName;
	}
	/**
	 * 获取：属性名称
	 */
	public String getAttributeName() {
		return attributeName;
	}
	/**
	 * 设置：属性类型:1.普通,2.材料,3.工艺,4.设计
	 */
	public void setAttributeType(String attributeType) {
		this.attributeType = attributeType;
	}
	/**
	 * 获取：属性类型:1.普通,2.材料,3.工艺,4.设计
	 */
	public String getAttributeType() {
		return attributeType;
	}
	/**
	 * 设置：页数(1)、文字(5)、数字(3)、图片(4)、尺寸(2)、大纸(6)
	 */
	public void setClassify(Long classify) {
		this.classify = classify;
	}
	/**
	 * 获取：页数(1)、文字(5)、数字(3)、图片(4)、尺寸(2)、大纸(6)
	 */
	public Long getClassify() {
		return classify;
	}
	/**
	 * 设置：属性排序
	 */
	public void setAttributeSort(Integer attributeSort) {
		this.attributeSort = attributeSort;
	}
	/**
	 * 获取：属性排序
	 */
	public Integer getAttributeSort() {
		return attributeSort;
	}
	/**
	 * 设置：创建人
	 */
	public void setCreateName(String createName) {
		this.createName = createName;
	}
	/**
	 * 获取：创建人
	 */
	public String getCreateName() {
		return createName;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public String getCreateTime() {
		return createTime;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	public List<GoodsOptionEntity> getGoodsOptionList() {
		return goodsOptionList;
	}

	public void setGoodsOptionList(List<GoodsOptionEntity> goodsOptionList) {
		this.goodsOptionList = goodsOptionList;
	}

	public Integer getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}

//	public Boolean getInfluenceCraftType() {
//		return influenceCraftType;
//	}
//
//	public void setInfluenceCraftType(Boolean influenceCraftType) {
//		this.influenceCraftType = influenceCraftType;
//	}

	public Boolean getJoinAttribute() {
		return joinAttribute;
	}

	public void setJoinAttribute(Boolean joinAttribute) {
		this.joinAttribute = joinAttribute;
	}

	public List<GoodsOptionEntity> getOptionSelectedList() {
		if(this.optionSelectedList == null){
			return new ArrayList<>();
		}
		return optionSelectedList;
	}

	public void setOptionSelectedList(List<GoodsOptionEntity> optionSelectedList) {
		this.optionSelectedList = optionSelectedList;
	}

	public String getAttributeValueKey() {
		return attributeValueKey;
	}

	public void setAttributeValueKey(String attributeValueKey) {
		this.attributeValueKey = attributeValueKey;
	}

	public Boolean getDateFlag() {
		return dateFlag;
	}

	public void setDateFlag(Boolean dateFlag) {
		this.dateFlag = dateFlag;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}
}
